<?php
if(!empty($category->name)){
	$catname = ' in ' . $category->name;
}
?>

<h1><?php echo __('Images') ?> <?php echo (isset($catname)) ? $catname : ''; ?></h1>
<br />
<div>
	<a href="<?php echo get_url('plugin/pgallery/edit_category/'.$category->id) ?>">Edit category</a> | 
	<a href="<?php echo get_url('plugin/pgallery/delete_category/'.$category->id) ?>">Delete category</a>
</div>

<p>

<?php
foreach($images as $image){
?>

<a href="<?php echo get_url('plugin/pgallery/edit_image/'.$image->id) ?>">
<img style="border:1px solid #ccc;padding:2px" src="<?php echo $urlbase.'/'.str_replace('#', 'small', $image->filename) ?>" />
</a>

<?php
}

echo ($count == 0) ? 'No items have been added to this category yet.' : '';



/*
	<li id="item_<?php echo $item->item_id; ?>" class="layout node <?php echo odd_even(); ?>">
		<img align="middle" alt="layout-icon" src="<?php echo URL_PUBLIC; ?>frog/plugins/pgallery/images/category.png" title="" />
		<a href="<?php echo get_url('plugin/pgallery/items/'.$cat->slug); ?>"><?php echo $cat->name; ?></a>
		<div class="remove"><a href="<?php echo get_url('plugin/pgallery/delete_category/'.$cat->category_id); ?>" onclick="return confirm('<?php echo __('Are you sure you wish to delete'); ?> <?php echo $cat->name; ?>?');"><img alt="<?php echo __('Remove category'); ?>" src="images/icon-remove.gif" /></a></div>
	</li>
*/
?>

</p>


<script type="text/javascript">
	// frog download box & description
	$$(".pgallery_item_actions").each(function(e){
		e.observe('mouseover', alert(e.id));
		});
</script>